Magnetic sensor including magnetoresistive effect element and sealed chip

ABSTRACT

A magnetic sensor includes a magnetic sensor chip that includes a magnetoresistive effect element and a sealed part. The magnetoresistive effect element includes a free layer and a pinned layer. The sealed part has a first surface and a second surface, which is opposite the first surface. The shape of the sealed part in the plan view from the first surface side is substantially quadrilateral. The substantially quadrilateral shape has a first side and a second side, which are substantially parallel to each other. In the plan view, from the first surface side of the sealed part, the magnetization direction of the pinned layer, in a state in which the external magnetic field is not applied on the magnetoresistive effect element, is inclined with respect to an approximately straight line found through the least squares method using a plurality of points arbitrarily set on the first side.

This application is a continuation of U.S. application Ser. No.17/094,171, which was filed on Nov. 10, 2020, the disclosure of which isincorporated herein by reference.

TECHNICAL FIELD

The present invention relates to a magnetic sensor.

BACKGROUND

Magnetoresistive effect elements (MR elements) such as giantmagnetoresistive effect elements (GMR elements), tunnel magnetoresistiveeffect elements (TMR elements), anisotropic magnetoresistive effectelements (MR elements) and the like have been applied in the field ofmagnetic sensors. For example, GMR elements or TMR elements include apinned layer, in which the magnetization direction is fixed, and a freelayer, in which the magnetization direction changes in accordance withan external magnetic field. When the strength of the external magneticfield applied on the magnetoresistive effect element changes, themagnetization direction of the free layer changes and the angle formedby the magnetization direction of the pinned layer and the magnetizationdirection of the free layer changes. Through the change in this angle,the resistance value of the magnetoresistive effect element changes, andthrough the change in this resistance value, it is possible to detectchanges in the strength of the external magnetic field.

A magnetic sensor that uses this kind of magnetoresistive effectelement, for example, has at least a magnetic sensor chip comprising amagnetoresistive effect element and a sealed part, which is sealed inorder to protect this magnetic sensor chip, and is used, for example, asan electric current sensor, an angle sensor or the like.

PATENT LITERATURE

PATENT LITERATURE 1 JP Laid-Open Patent Application No. 2009-162499

PROBLEM TO BE SOLVED BY THE INVENTION

In a magnetic sensor having a configuration in which the magnetic sensorchip is sealed by the sealed part, stress from outside the magneticsensor is at times applied on the magnetic sensor chip during and aftermanufacturing of the magnetic sensor. When an external magnetic field isnot applied on the magnetoresistive effect element, the magnetization ofthe free layer is oriented in a fixed direction by a bias magnet, butwhen the stress is received, the magnetization direction of the freelayer may change due to an inverse magnetostrictive effect. When themagnetization direction of the free layer on which an external magneticfield is not applied changes from the prescribed direction, there is aconcern that there could be an effect on the change in the resistancevalue of the magnetoresistive effect element when an external magneticfield is applied, that is, on the output of the magnetic sensor when anexternal magnetic field is applied. For example, in an electric currentsensor that uses a magnetic sensor having a magnetoresistive effectelement, the electric current value detected in a state in which stressis applied on the magnetic sensor chip includes errors, creating theproblem that this kind of magnetic sensor cannot be used in applicationsin which the electric current value or the like that is the target ofdetection needs to be detected stably and with high precision.

In addition, a TMR-type magnetoresistive effect element has a high MRratio compared to a GMR-type or AMR-type magnetoresistive effect elementand has markedly superior output properties but is also sensitive toexternal stress applied on the magnetic sensor chip, the output of themagnetic sensor could be greatly affected.

External stress applied on the magnetic sensor chip is difficult topredict, and even if such could be predicted, controlling such externalstress is difficult. Accordingly, in order to secure the detectionprecision of the magnetic sensor, it is desirable for the magneticsensor to have a configuration in which output is unlikely to be greatlycaused to fluctuate by external stress.

In consideration of the foregoing, it is an object of the presentinvention to provide a magnetic sensor in which it is possible tosuppress fluctuations in output caused by stress applied from theoutside.

MEANS FOR SOLVING THE PROBLEM

To achieve such an object, the present invention provides a magneticsensor comprising a magnetic sensor chip that includes amagnetoresistive effect element and a sealed part that integrally sealsthe magnetic sensor chip. The magnetoresistive effect element includes afree layer, the magnetization direction of which can change inaccordance with an external magnetic field, and a pinned layer, themagnetization direction of which is fixed. The sealed part has a firstsurface and a second surface, which is opposite the first surface. Theshape of the sealed part in the plan view from the first surface side issubstantially quadrilateral. The substantially quadrilateral shape has afirst side and a second side, which are substantially parallel to eachother, and a third side and a fourth side, which are substantiallyparallel to each other and that intersect the first side and the secondside. In the plan view from the first surface side of the sealed part,the magnetization direction of the pinned layer, in a state in which theexternal magnetic field is not applied on the magnetoresistive effectelement, is inclined with respect to an approximately straight linefound through the least squares method using a plurality of pointsarbitrarily set on the first side.

The magnetization direction of the pinned layer, in a state in which theexternal magnetic field is not applied on the magnetoresistive effectelement, may be inclined at an angle of 10˜80° with respect to theapproximately straight line.

The shape in the plan view of the magnetic sensor chip may besubstantially a quadrilateral having a first side and a second side,which are substantially parallel to each other, and a third side and afourth side, which are substantially parallel to each other and whichintersect the first side and the second side, the first side of themagnetic sensor chip and the approximately straight line aresubstantially parallel, and when the magnetic sensor chip is viewed fromthe first surface side of the sealed part, the magnetization directionof the pinned layer in a state in which the external magnetic field isnot applied on the magnetoresistive effect element may be inclined withrespect to the first side of the magnetic sensor chip.

The shape in the plan view of the magnetic sensor chip may besubstantially a quadrilateral having a first side and a second side,which are substantially parallel to each other, and a third side and afourth side, which are substantially parallel to each other and whichintersect the first side and the second side, and when the magneticsensor chip is viewed from the first surface side of the sealed part,the magnetization direction of the pinned layer, in a state in which theexternal magnetic field is not applied on the magnetoresistive effectelement, may be substantially parallel to or substantially orthogonal tothe first side of the magnetic sensor chip, and the first side of themagnetic sensor chip may be inclined with respect to the approximatelystraight line.

The magnetic sensor chip may include a plurality of the magnetoresistiveeffect elements and the magnetization directions of the free layers ofthe magnetoresistive effect elements in a state in which the externalmagnetic field is not applied on the plurality of magnetoresistiveeffect elements may correspond to each other, the magnetoresistiveeffect element may be a GMR element or a TMR element, and the sealedpart may include a resin.

EFFICACY OF THE INVENTION

With the present invention, it is possible to provide a magnetic sensorin which it is possible to suppress fluctuations in output caused bystress applied from the outside.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic cross-sectional view showing a schematicconfiguration from a side perspective of a magnetic sensor according toan embodiment of the present invention.

FIG. 2 is a plan view showing the schematic configuration of theinternal structure in a plan view from a first surface side of thesealed part of the magnetic sensor shown in FIG. 1 .

FIG. 3A is a circuit diagram showing the schematic configuration of themagnetic sensor according to the embodiment of the present invention.

FIG. 3B is a graph showing measurement results for output of themagnetic sensor shown in FIG. 3A.

FIG. 3C is a circuit diagram showing the schematic configuration in astate in which stress at a 45° direction is applied on the magneticsensor shown in FIG. 3A.

FIG. 3D is a graph showing measurement results for output of themagnetic sensor shown in FIG. 3C.

FIG. 4A is a perspective view showing the schematic configuration of themagnetoresistive effect element of the magnetic sensor according to theembodiment of the present invention.

FIG. 4B is a plan view when the magnetoresistive effect element shown inFIG. 4A is viewed from the free layer side.

FIG. 5A is a schematic diagram conceptually showing the magnetization ofthe free layer in a state in which an external magnetic field is notapplied.

FIG. 5B is a schematic diagram conceptually showing the magnetization ofthe pinned layer in a state in which an external magnetic field is notapplied.

FIG. 6 is a plan view showing the positional relationship between themagnetization direction of the pinned layer and the sealed part andmagnetic sensor chip of the magnetic sensor according to the embodimentof the present invention.

FIG. 7 is a plan view showing the positional relationship between themagnetization direction of the pinned layer and the sealed part andmagnetic sensor chip of the magnetic sensor according to anotherembodiment of the present invention.

FIG. 8A is a graph showing the relationship between voltage offset andthe applied angle of external stress at an output voltage V1 when thepinned layer of the magnetic sensor is inclined at 0°, 10°, 20°, 30° and45°, respectively.

FIG. 8B is a graph showing the relationship between voltage offset andthe applied angle of external stress at an output voltage V2 when thepinned layer of the magnetic sensor is inclined at 0°, 10°, 20°, 30° and45°, respectively.

FIG. 8C is a graph showing the relationship between voltage offset andthe applied angle of external stress at an output voltage (V1−V2) whenthe pinned layer of the magnetic sensor is inclined at 0°, 10°, 20°, 30°and 45°, respectively.

FIG. 9A is a graph showing the relationship between voltage offset andthe applied angle of external stress at an output voltage V1 when thepinned layer of the magnetic sensor is inclined at 90°, 80°, 70°, 60°and 45°, respectively.

FIG. 9B is a graph showing the relationship between voltage offset andthe applied angle of external stress at an output voltage V2 when thepinned layer of the magnetic sensor is inclined at 90°, 80°, 70°, 60°and 45°, respectively.

FIG. 9C is a graph showing the relationship between voltage offset andthe applied angle of external stress at an output voltage (V1−V2) whenthe pinned layer of the magnetic sensor is inclined at 90°, 80°, 70°,60° and 45°, respectively.

FIG. 10A is an end view showing a schematic configuration of an electriccurrent sensor equipped with the magnetic sensor of the presentinvention.

FIG. 10B is a cross-sectional view along line A-A of the electriccurrent sensor shown in FIG. 10A.

FIG. 11 is a perspective view showing the schematic configuration of amagnetoresistive effect element of a magnetic sensor according toanother embodiment of the present invention.

FIG. 12A is a side view of the magnetic sensor fixed to a substrate.

FIG. 12B is a side view when a plate is pressed against the back side ofthe substrate.

FIG. 12C is a top view when a plate is pressed against the substrate ata 45° angle with respect to an approximately straight line.

FIG. 13A is a graph showing the relationship between the voltage offsetand the displacement in Embodiment 1 when an external stress is appliedat a 0° angle.

FIG. 13B is a graph showing the relationship between the voltage offsetand the displacement in Embodiment 1 when an external stress is appliedat a 45° angle.

FIG. 13C is a graph showing the relationship between the voltage offsetand the displacement in Embodiment 1 when an external stress is appliedat a 90° angle.

FIG. 14A is a graph showing the relationship between the voltage offsetand the displacement in Embodiment 2 when an external stress is appliedat a 0° angle.

FIG. 14B is a graph showing the relationship between the voltage offsetand the displacement in Embodiment 2 when an external stress is appliedat a 45° angle.

FIG. 14C is a graph showing the relationship between the voltage offsetand the displacement in Embodiment 2 when an external stress is appliedat a 90° angle.

FIG. 15A is a plan view from a first surface side of the magnetic sensorof Comparison Example 1.

FIG. 15B is a plan view from a first surface side of the magnetic sensorof Comparison Example 2.

FIG. 16A is a graph showing the relationship between the voltage offsetand displacement in Comparison Example 1 when an external stress isapplied at a 0° angle.

FIG. 16B is a graph showing the relationship between the voltage offsetand displacement in Comparison Example 1 when an external stress isapplied at a 45° angle.

FIG. 16C is a graph showing the relationship between the voltage offsetand displacement in Comparison Example 1 when an external stress isapplied at a 90° angle.

FIG. 17A is a graph showing the relationship between the voltage offsetand displacement in Comparison Example 2 when an external stress isapplied at a 0° angle.

FIG. 17B is a graph showing the relationship between the voltage offsetand displacement in Comparison Example 2 when an external stress isapplied at a 45° angle.

FIG. 17C is a graph showing the relationship between the voltage offsetand displacement in Comparison Example 2 when an external stress isapplied at a 90° angle.

BEST MODE FOR IMPLEMENTING THE INVENTION

Below, an embodiment of the magnetic sensor of the present invention isdescribed with reference to the drawings.

In the description of the magnetic sensor according to this embodiment,as necessary the “X direction, Y direction and Z direction” arestipulated in a number of the drawings. Here, the X direction matchesthe magnetization direction of the pinned layer of the magnetoresistiveeffect element. The Y direction is a direction orthogonal to the Xdirection and matches the magnetization direction of the free layer in astate in which an external magnetic field is not applied. The Zdirection is a direction orthogonal to the X direction and the Ydirection and matches the layering direction of the multilayer film ofthe magnetoresistive effect element. The orientation of arrowsindicating the X, Y and Z directions in each of the drawings indicatesthe +X direction, +Y direction and +Z direction, and the orientation onthe opposite side from the orientation of the arrows indicates the −Xdirection, −Y direction and −Z direction.

FIG. 1 is a schematic cross-sectional view showing a schematicconfiguration from a side perspective of a magnetic sensor according tothis embodiment, and FIG. 2 is a plan view showing the schematicconfiguration of the internal structure from a first surface side of thesealed part of the magnetic sensor shown in FIG. 1 .

As shown in FIG. 1 and FIG. 2 , a magnetic sensor 1 includes a magneticsensor chip 2 and a sealed part 3, which is sealed integrally with themagnetic sensor chip 2. The sealed part 3 has a first surface 3 a and asecond surface 3 b, which is opposite the first surface 3 a, and theshape of the sealed part 3 in a plan view from the first surface 3 aside is a substantially quadrilateral shape with a first side 31 andsecond side 32, which are substantially parallel to each other, and athird side 33 and a fourth side 34, which are substantially parallel toeach other and intersect the first side 31 and the second side 32.Preferably, the sealed part 3 has the first surface 3 a and the secondsurface 3 b, which is opposite the first surface 3 a. The shape of thesealed part 3 in a plan view from the first surface 3 a side is asubstantially square shape having the first side 31 and the second side32, which are substantially parallel to each other. The third side 33and the fourth side 34 are substantially parallel to each other andsubstantially orthogonal to the first side 31 and the second side 32.

The magnetic sensor chip 2 has a substantially quadrilateral shape witha first side 21 and a second side 22, which are substantially parallelto each other in the plan view, and a third side 23 and a fourth side24, which are substantially parallel to each other and which intersectthe first side 21 and the second side 22. Preferably, the magneticsensor chip 2 is a substantially square shape with the first side 21 andthe second side 22 substantially parallel to each other in the plan viewand the third side 23 and the fourth side 24 substantially parallel toeach other and substantially orthogonal to the first side 21 and thesecond side 22. In addition, the magnetic sensor chip 2 comprises amagnetoresistive effect element. As the magnetoresistive effect element,it is possible, for example, to use a giant magnetoresistive effect(GMR) type magnetoresistive effect element or a tunnel magnetoresistiveeffect (TMR) type magnetoresistive effect element.

In this embodiment, substantially parallel and substantially orthogonaland substantially quadrilateral shape and substantially square shape areconcepts that include manufacturing errors and the like at the time ofmanufacturing the magnetic sensor chip 2 and the sealed part 3. Forsubstantially parallel, an extension line extending along the first side31 of the sealed part 3 and an extension line extending along the secondside 32 may intersect so that the angle formed by the two extensionlines is 3° or less. For substantially orthogonal, the angle formed bythe first side 31 and the third side 33 or the angle formed by anextension line extending along the first side 31 and an extension lineextending along the third side 33 may be within the range of 89˜91°. Inaddition, for the substantially quadrilateral shape and thesubstantially square shape, in the plan view from the first surface 3 aside, the first surface 3 a of the sealed part 3 may be a quadrilateralwith rounded corners, a square with rounded corners, a rectangle withrounded corners, or a quadrilateral in which C-chamfering has beenimplemented on the corners, a square in which C-chamfering has beenimplemented on the corners, a rectangle in which C-chamfering has beenimplemented on the corners, or the like. Furthermore, for substantiallyparallel, an extension line extending along the first side 21 of themagnetic sensor chip 2 and an extension line extending along the secondside 32 may intersect so that the angle formed by the two extensionlines is 3° or less. For substantially orthogonal, the angle formed bythe first side 21 and the third side 23 or the angle formed by anextension line extending along the first side 21 and an extension lineextending along the third side 23, may be within the range of 89˜91°.Furthermore, for a substantially quadrilateral shape and a substantiallysquare shape, in the plan view, the magnetic sensor chip 2 may be aquadrilateral with rounded corners, a square with rounded corners, arectangle with rounded corners, or a quadrilateral in which C-chamferinghas been implemented on the corners, a square in which C-chamfering hasbeen implemented on the corners, a rectangle in which C-chamfering hasbeen implemented on the corners, or the like.

The sealed part 3 possessed by the magnetic sensor 1 should be one thatis sealed integrally with and protects the magnetic sensor chip 2 and,for example, may be composed of resin. When stress from the outside isapplied on the magnetic sensor 1, the sealed part 3 can mitigate theeffects of stress applied on the magnetic sensor chip 2 by exhibiting acushioning action against this stress. The elastic modulus of the resincomposing this sealed part 3 should be for example around 0.1˜50 GPa.Examples of the resin that can form the sealed part 3 include epoxyresin, styrene resin, ABS resin and the like. The dimensions of thesealed part 3 are not particularly limited as long as the magneticsensor chip 2 can be integrally sealed and can be appropriately set inaccordance with the application or the like.

The magnetic sensor 1 according to this embodiment may also comprise adie pad 4 having a mounting surface for mounting the magnetic sensorchip 2, a plurality of lead wires 5 placed surrounding the die pad 4,and a wiring unit 6 that electrically connects the lead wires 5 and theterminals of the magnetic sensor chip 2. The die pad 4 should becomposed of an electrically conductive material such as copper or thelike. The magnetic sensor chip 2 should be fixed to the mounting surfaceof the die pad 4 by an adhesive (undepicted) such as conductive paste,insulating paste, die attach film (DAF) or the like. The wiring unit 6can be composed of bonding wire or the like made of gold wires or thelike.

FIG. 3A is a circuit diagram showing the schematic configuration of themagnetic sensor according to this embodiment. The magnetic sensor 1includes a first magnetoresistive effect element 11, a secondmagnetoresistive effect element 12, a third magnetoresistive effectelement 13 and a fourth magnetoresistive effect element 14, and thefirst through fourth magnetoresistive effect elements 11˜14 areconnected to each other with a bridge circuit (Wheatstone bridge). Thefirst through fourth magnetoresistive effect elements 11˜14 are dividedinto two groups, namely a group consisting of the first magnetoresistiveeffect element 11 and the second magnetoresistive effect element 12 anda group consisting of the third magnetoresistive effect element 13 andthe fourth magnetoresistive effect element 14, and the magnetoresistiveeffect elements within each of these pairs are connected in series. Thefirst magnetoresistive effect element 11 and the fourth magnetoresistiveeffect element 14 are connected to a power source voltage Vcc, and thesecond magnetoresistive effect element 12 and the third magnetoresistiveeffect element 13 are connected to ground (GND). The output voltagebetween the first magnetoresistive effect element 11 and the secondmagnetoresistive effect element 12 is taken out as a midpoint voltageV1, and the output voltage between the third magnetoresistive effectelement 13 and the fourth magnetoresistive effect element 14 is takenout as a midpoint voltage V2. Accordingly, when the electricalresistances of the first through fourth magnetoresistive effect elements11˜14 are called R1˜R4, respectively, the midpoint voltages V1 and V2can be found from the following equations (1) and (2), respectively.

$\begin{matrix}{\left. {{Formula}1} \right\rbrack} & \\{V_{1} = {\frac{R_{2}}{R_{1} + R_{2}}V_{cc}}} & (1)\end{matrix}$ $\begin{matrix}{\left. {{Formula}2} \right\rbrack} & \\{V_{2} = {\frac{R_{3}}{R_{3} + R_{4}}V_{cc}}} & (2)\end{matrix}$

In this embodiment, the description takes as an example a configurationin which each of the first through fourth magnetoresistive effectelements 11˜14 comprises a single magnetoresistive effect element, buteach of the first through fourth magnetoresistive effect elements 11˜14may comprise a plurality of magnetoresistive effect elements, or each ofthe first through fourth magnetoresistive effect elements 11˜14 maycomprise a plurality of magnetoresistive effect elements connected inseries.

Because the first through fourth magnetoresistive effect elements 11˜14have the same structure, the description will take the firstmagnetoresistive effect element 11 as an example. FIG. 4A is aperspective view showing the schematic configuration of themagnetoresistive effect element (the first magnetoresistive effectelement 11) of the magnetic sensor according to this embodiment. Thefirst magnetoresistive effect element 11 includes a multilayer film 40,which has a substantially rectangular in the plan view, and a pair ofbias magnets 47, which are positioned at both ends of the multilayerfilm 40 in the lengthwise direction so that the multilayer film 40 islocated in between the bias magnets 47. The multilayer film 40 has ageneral spin-valve-type film composition. The multilayer film 40includes an antiferromagnetic layer 41, a pinned layer 42, a spacerlayer 45 and a free layer 46, and these layers are layered in thisorder. The multilayer film 40 is located between a pair of electrodelayers (undepicted) in this layering direction and is configured so thata sense electric current flows in the layering direction from theelectrode layer to the multilayer film 40. In this embodiment, the shapeof the multilayer film 40 in the plan view is a substantially squareshape but may be a substantially rectangular shape. Here, thesubstantially square shape or substantially rectangular shape includes,besides a square shape and a rectangular shape, a square shape havingrounded corners, a rectangular shape having rounded corners, and thelike. In addition, in this embodiment, the first through fourthmagnetoresistive effect elements 11˜14 have a pair of bias magnets 47with the multilayer film 40 located in between the bias magnets 47, butthis is intended to be illustrative and not limiting and, for example,in the case of a rectangular shape or oval shape including an ellipse inwhich the multilayer film 40 uses magnetic shape anisotropy, the biasmagnets 47 need not be present.

The free layer 46 is a magnetic layer, the magnetization direction ofwhich changes in accordance with the external magnetic field, and iscomposed of, for example, NiFe, CoFe, CoFeB, CoFeNi, Co₂MnSi, Co₂MnGe,FeOx (Fe oxides), or the like. The pinned layer 42 is a ferromagneticlayer, the magnetization direction of which is fixed with respect to theexternal magnetic field through exchange coupling with theantiferromagnetic layer 41 and is composed of the same magnetic materialas the free layer 46. The antiferromagnetic layer 41 is composed, forexample, of an antiferromagnetic material including Mn and at least onetype of element selected from among the group of Pt, Ru, Rh, Pd, Ni, Cu,Ir, Cr and Fe. The Mn content in the antiferromagnetic material shouldbe around 35˜95 atom %, for example. The spacer layer 45 is positionedbetween the free layer 46 and the pinned layer 42 and is a nonmagneticlayer that exhibits the magnetoresistive effect. The spacer layer 45 isa nonmagnetic conductive layer composed of a nonmagnetic metal, such asCu or the like, or is a tunnel barrier layer composed of a nonmagneticinsulator such as Al₂O₃. When the spacer layer 45 is a nonmagneticconductive layer, the first magnetoresistive effect element 11 functionsas a giant magnetoresistive effect (GMR) element, and when the spacerlayer 45 is a tunnel barrier layer, the first magnetoresistive effectelement 11 functions as a tunnel magnetoresistive effect (TMR) element.To make the magnetoresistive effect large and increase the outputvoltage of the bridge circuit, the first magnetoresistive effect element11 is more preferably a TMR element.

FIG. 4B is a plan view showing the schematic composition of themagnetoresistive effect element (first magnetoresistive effect element11) shown in FIG. 4A when viewed from the free layer 46 side. FIG. 5A isa schematic diagram conceptually showing the magnetization of the freelayer 46 in a state in which an external magnetic field is not applied.FIG. 5B is a schematic diagram conceptually showing the magnetization ofthe pinned layer 42 in a state in which an external magnetic field isnot applied. Arrows in FIG. 5A and FIG. 5B schematically show themagnetization directions.

The free layer 46 is magnetized in an initial magnetization direction D1substantially parallel to the lengthwise direction in the plan viewthrough the bias magnetic field of the bias magnets 47. The initialmagnetization direction D1 of the free layer 46 is substantiallyparallel to the magnetization direction D2 of the bias magnets 47. Thepinned layer 42 is magnetized in a magnetization direction D3substantially parallel to the short direction. When an external magneticfield in the short direction, which is the magnetically sensitivedirection of the free layer 46, is applied, the magnetization of thefree layer 46 rotates clockwise or anticlockwise in FIG. 4B inaccordance with the strength of the external magnetic field. Throughthis, the relative angle between the magnetization direction D3 of thepinned layer 42 and the magnetization direction of the free layer 46changes, and the electrical resistance to the sense electric currentchanges.

As shown in FIG. 3A, the initial magnetization direction D1 of the freelayer 46 in the first through fourth magnetoresistive effect elements11˜14 is the lengthwise direction of the free layer 46. Themagnetization direction D3 of the pinned layers 42 of the firstmagnetoresistive effect element 11 and the third magnetoresistive effectelement 13 is the short direction of the pinned layer 42, and themagnetization direction D3 of the pinned layers 42 of the secondmagnetoresistive effect element 12 and the fourth magnetoresistiveeffect element 14 is antiparallel to the magnetization direction D3 ofthe pinned layers 42 of the first magnetoresistive effect element 11 andthe third magnetoresistive effect element 13. Accordingly, when anexternal magnetic field in the magnetization direction D3 of the pinnedlayers 42 of the first magnetoresistive effect element 11 and the thirdmagnetoresistive effect element 13 is applied, the electrical resistanceof the first magnetoresistive effect element 11 and the thirdmagnetoresistive effect element 13 decreases, and the electricalresistance of the second magnetoresistive effect element 12 and thefourth magnetoresistive effect element 14 increases. Through this, themidpoint voltage V1 increases and the midpoint voltage V2 decreases, asshown in FIG. 3B. On the other hand, when an external magnetic field inthe magnetization direction D3 of the pinned layers 42 of the secondmagnetoresistive effect element 12 and the fourth magnetoresistiveeffect element 14 is applied, the midpoint voltage V1 decreases and themidpoint voltage V2 increases. By detecting the difference (V1−V2)between the midpoint voltage V1 and the midpoint voltage V2, twice thesensitivity can be obtained compared to detecting the midpoint voltageV1 and the midpoint voltage V2. In addition, even if the midpointvoltage V1 and the midpoint voltage V2 in FIG. 3B shift (offset) in thesame direction (for example, upwards in the graph in FIG. 3B), bydetecting the difference (V1−V2) between the midpoint voltage V1 and themidpoint voltage V2, it is possible to exclude the effects of theoffset.

When stress in a prescribed direction is applied on the first throughfourth magnetoresistive effect elements 11˜14, the initial magnetizationdirection D1 of the free layer 46 rotates due to an inversemagnetostrictive effect. FIG. 3C is a schematic drawing showing a statein which a tensile stress S is applied at a 45° angle with respect tothe lengthwise direction of the free layer 46 of the first throughfourth magnetoresistive effect elements 11˜14. The inversemagnetostrictive effect acts in different directions depending onwhether the magnetostrictive constant is negative or positive andwhether the stress is a tensile stress S or a compression stress. Whenthe magnetostrictive constant of the free layer 46 on which a tensilestress is applied is positive, and when the magnetostrictive constant ofthe free layer 46 on which a compression stress is applied is negative,the initial magnetization direction D1 of the free layer 46 rotates to adirection parallel to the stress. When the magnetostrictive constant ofthe free layer 46 on which the tensile stress S is applied is negative,and when the magnetostrictive constant of the free layer 46 on which acompression stress is applied is positive, the initial magnetizationdirection D1 of the free layer 46 rotates to a direction orthogonal tothe stress. As shown in FIG. 3C, when the tensile stress S is applied ata 45° angle, the magnetostrictive constant of the free layer 46 becomesnegative and the initial magnetization direction D1 of the free layers46 of the first magnetoresistive effect element 11 and the thirdmagnetoresistive effect element 13 rotates to the orientation of themagnetization direction D3 of the pinned layer 42, so the electricalresistance of the first magnetoresistive effect element 11 and the thirdmagnetoresistive effect element 13 decreases. The initial magnetizationdirection D1 of the free layer 46 of the second magnetoresistive effectelement 12 and the fourth magnetoresistive effect element 14 rotates tothe opposite direction of the magnetization direction D3 of the pinnedlayer 42, so the electrical resistance of the second magnetoresistiveeffect element and the fourth magnetoresistive effect element 14increases. Through this, as shown in FIG. 3D, the midpoint voltage V1increases and the midpoint voltage V2 decreases, so the difference(V1−V2) between the midpoint voltage V1 and the midpoint voltage V2increases. That is, through the external stress, the above-describeddifference (V1−V2) that is the output of the magnetic sensor 1 when noexternal magnetic field is applied is offset from zero. There is concernthat the offset of the output (the above-described difference V1−V2)could affect the detection accuracy of the magnetic sensor 1.

The external stress can occur due to a force received from the resin orthe like used for sealing when the magnetic sensor chip 2 is enclosed byresin, for example. Stress can also occur in procedures (for example,soldering procedures) when mounting the magnetic sensor 1 in which themagnetic sensor chip 2 is sealed in the sealed part 3 on a substrate toform a module. Stress can arise in procedures (for example, screwingprocedures) when the module is incorporated into a product, and evenwhen used as a product, thermal stress can arise through temperaturechanges, for example. Such stress is difficult to predict and measureand is also difficult to control. Accordingly, what is essentiallydesired is for the output (the above-described difference V1−V2) of themagnetic sensor 1 to not be affected by external stress.

FIG. 6 is a plan view showing the positional relationship between themagnetization direction of the pinned layer 42 and the sealed part 3 andmagnetic sensor chip 2 of the magnetic sensor according to thisembodiment. As shown in FIG. 6 , in the magnetic sensor 1 according tothis embodiment, the magnetization direction of the pinned layer 42 isinclined with respect to the approximately straight line 7 found throughthe least squares method using a plurality of points arbitrarily set onthe first side 31 of the sealed part 3. Through this, it is possible toreduce the stress sensitivity of the magnetic sensor 1, and to realizethe effect of improving offset properties. In this embodiment, anarbitrary plurality of points was set on the first side 31 in order tofind the approximately straight line 7, but this is intended to beillustrative and not limiting, for the approximately straight line 7 maybe found by setting a plurality of points arbitrarily on any one of thesides out of the first side 31, the second side 32, the third side 33and the fourth side 34.

In the magnetic sensor 1 according to this embodiment, the lengthwisedirection of the pinned layer 42 of the first through fourthmagnetoresistive effect elements 11˜14 is inclined with respect to thefirst side 21 of the magnetic sensor chip 2, and the first side 21 ofthe magnetic sensor chip 2 and the above-described approximatelystraight line 7 found through the least squares method using a pluralityof points arbitrarily set on the first side 31 of the sealed part 3 aresubstantially parallel, and through this the magnetization direction ofthe pinned layer 42 may be inclined with respect to the above-describedapproximately straight line 7 (see FIG. 6 ). In this embodiment, thestate shown in FIG. 6 is intended to be illustrative and not limiting,for the magnetization direction of the pinned layer 42 may be caused toincline with respect to the above-described approximately straight line7 by making the lengthwise or short direction of the pinned layer 42 ofthe first through fourth magnetoresistive effect elements 11˜14 and thefirst side 21 of the magnetic sensor chip 2 be substantially paralleland by causing the first side 21 of the magnetic sensor chip 2 to beinclined with respect to the above-described approximately straight line7 found through the least squares method using a plurality of pointsarbitrarily set on the first side 31 of the sealed part 3 (see FIG. 7 ).

FIGS. 8A˜C are graphs showing the output voltages V1 and V2 with respectto external stress when the magnetization direction of the pinned layer42 is inclined at 0°, 10°, 20°, 30° and 45°, respectively, with respectto the approximately straight line 7 of the magnetic sensor 1 shown inFIG. 6 , and the change in the difference (V1−V2) of the outputs. In themagnetic sensor 1 in a state in which the pinned layer 42 is at 0°, thatis to say substantially parallel, to the approximately straight line 7,the voltage offset of the output voltage V1 increases in the negativedirection (see FIG. 8A) and the voltage offset of the output V2increases in the positive direction (see FIG. 8B) when an externalstress is applied at 45°. Consequently, the voltage offset of thedifference (V1−V2) of the outputs increases in the negative direction(see FIG. 8C), and the effect of the external stress is greatlyreceived. In the magnetic sensor 1 in a state in which the magnetizationdirection of the pinned layer 42 is inclined at 10°, 20° and 30°,respectively, with respect to the approximately straight line 7, theamount of increase of the difference (V1−V2) of the outputs in thenegative direction can be diminished as the angle of the magnetizationdirection of the pinned layer 42 becomes larger (see FIG. 8C).Furthermore, in the magnetic sensor 1 in which the magnetizationdirection of the pinned layer 42 is inclined at a 45° angle with respectto the approximately straight line 7, the output V1 increases in thepositive direction (see FIG. 8A) and V2 increases in the negativedirection (see FIG. 8B), so the voltage offset of the difference (V1−V2)of the outputs is virtually completely suppressed.

FIGS. 9A˜C are graphs showing the output voltages V1 and V2 with respectto external stress when the magnetization direction of the pinned layer42 is inclined at 90°, 80°, 70°, 60° and 45°, respectively, with respectto the approximately straight line 7 of the magnetic sensor 1 shown inFIG. 6 , and the change in the difference (V1−V2) of the outputs. In themagnetic sensor 1 in a state in which the pinned layer 42 is at 90°,that is, substantially orthogonal, to the approximately straight line 7,the voltage offset of the output voltage V1 increases in the positivedirection (see FIG. 9A) and the voltage offset of the output V2increases in the negative direction (see FIG. 9B) when an externalstress is applied at 45°. Consequently, the voltage offset of thedifference (V1−V2) of the outputs increases in the positive direction(see FIG. 9C), and the effect of the external stress is greatlyreceived. In the magnetic sensor 1 in a state in which the magnetizationdirection of the pinned layer 42 is inclined at 80°, 70° and 60°,respectively, with respect to the approximately straight line 7, theamount of increase of the difference (V1−V2) of the outputs in thepositive direction can be diminished as the angle of the magnetizationdirection of the pinned layer 42 becomes smaller (see FIG. 9C).Furthermore, in the magnetic sensor 1 in which the magnetizationdirection of the pinned layer 42 is inclined at a 45° angle with respectto the approximately straight line 7, the voltage offset of thedifference (V1−V2) of the outputs is virtually completely suppressed.

As shown in FIGS. 8A˜C and FIG. 9A˜C, by causing the magnetizationdirection of the pinned layer 42 to be inclined with respect to theapproximately straight line 7 in a state in which an external magneticfield is not applied on the magnetoresistive effect element, it ispossible to diminish the stress sensitivity and to reduce fluctuationsin voltage offset. The angle of inclination of the pinned layer 42 isnot particularly restricted as long as such is within a range capable ofreducing fluctuation in the voltage offset, and inclination within arange of 10˜80° with respect to the approximately straight line 7 isparticularly preferable.

The magnetic sensor 1 described above can be used in an electric currentsensor, for example. FIG. 10A is a schematic end view of an electriccurrent sensor equipped with the magnetic sensor 1, and FIG. 10B is across-sectional view along line A-A in FIG. 10A. The magnetic sensor 1is positioned near an electric current line 102 and causes generation ofa magnetoresistive change in accordance with change in a signal magneticfield Bs that is applied. An electric current sensor 101 has a firstsoft magnetic material 103 and a second soft magnetic material 104, foradjusting the magnetic field strength, and a solenoid-type feedback coil105, which is provided near the magnetic sensor 1.

The feedback coil 105 causes generation of a magnetic field Bc thatcancels the signal magnetic field Bs. The feedback coil 105 is wound ina spiral shape around the magnetic sensor 1 and the second soft magneticmaterial 104. An electric current i flows in the electric current line102 from the front side of the paper to the back side in FIG. 10A andfrom left to right in FIG. 10B. Through this electric current i, aclockwise external magnetic field Bo is induced in FIG. 10A. Theexternal magnetic field Bo is mitigated by the first soft magneticmaterial 103, is amplified by the second soft magnetic material 104 andis applied leftward on the magnetic sensor 1 as the signal magneticfield B s. The magnetic sensor 1 outputs a voltage signal correspondingto the signal magnetic field B s, and this voltage signal is input intothe feedback coil 105. In the feedback coil 105, the feedback electriccurrent Fi flows, and the feedback electric current Fi generates acancel magnetic field Bc that cancels the signal magnetic field Bs.Because the signal magnetic field Bs and the cancel magnetic field Bchave the same absolute value but are opposite in direction, the signalmagnetic field Bs is offset by the cancel magnetic field Bc, so that themagnetic field that is applied on the magnetic sensor 1 becomesubstantially zero. The feedback electric current Fi is converted into avoltage by a resistor (undepicted) and is output as a voltage value. Thevoltage value is proportional to the feedback electric current Fi, thecancel magnetic field Bc and the signal magnetic field Bs, so it ispossible to obtain an electric current that flows in the electriccurrent line 102 from the voltage value.

The above-described embodiment was described in order to facilitateunderstanding of the present invention and was not described to limitthe present invention. Accordingly, all components disclosed in theabove-described embodiment shall be construed to include all designmodifications and equivalents falling within the technical scope of thepresent invention.

In the above-described embodiment, the multilayer film 40 that makes upthe magnetoresistive effect elements was described by taking as anexample one that includes the antiferromagnetic layer 41, the pinnedlayer 42, the spacer layer 45 and the free layer 46, but this isintended to be illustrative and not limiting, for it would be fine toinclude a nonmagnetic intermediate layer 43 and a reference layer 44between the pinned layer 42 and the spacer layer 45, for example (seeFIG. 11 ). The reference layer 44 is a ferromagnetic layer interposedbetween the pinned layer 42 and the spacer layer 45, is magneticallycoupled with the pinned layer 42 via the nonmagnetic intermediate layer43 made of Ru, Rh or the like, and more specifically isantiferromagnetically coupled with the pinned layer 42. Accordingly, thereference layer 44 and the pinned layer 42 both have magnetizationdirections fixed with respect to the external magnetic field, and themagnetization directions thereof are in orientations antiparallel toeach other. Through this, even when the magnetization direction of thereference layer 44 stabilizes, the magnetic field discharged from thereference layer 44 is canceled by the magnetic field discharged from thepinned layer 42, so that it is possible to suppress any magnetic fieldleakage to the outside. In this case, the magnetization direction of thereference layer 44 can be inclined with respect to the approximatelystraight line 7.

EMBODIMENTS

Below, the present invention will be described in greater detail throughembodiments, but the present invention is in no way limited by thebelow-described embodiments or the like.

Embodiment 1

A magnetic sensor 1 having the configuration shown in FIG. 6 and withthe magnetization direction of the pinned layer 42 with respect to theapproximately straight line 7 being 45° was prepared, and the changes inthe outputs V1 and V2 of the magnetic sensor 1 and the difference(V1−V2) of the outputs in a state in which the tensile stress S (seeFIG. 3C) was applied on the magnetic sensor 1 were measured. The statein which the tensile stress S was applied on the magnetic sensor 1 wasrealized through the simulated load method described below.

FIGS. 12A˜12C are drawings describing the simulated load addition methodof the magnetic sensor. First, the magnetic sensor 1 is fixed to asubstrate 51 through soldering of the lead wires 5 (see FIG. 12A). Next,a plate 52 is pressed in the +Z direction against the back surface(surface on the side opposite the surface to which the magnetic sensor 1is fixed) side of the substrate 51 (see FIG. 12B). Because the substrate51 curves so that the front surface (the surface to which the magneticsensor 1 is fixed) side becomes convex, the lead wires 5 deform tospread to the outside. Through this, it is possible to apply the tensilestress S on the magnetic sensor 1 via the lead wires 5. FIG. 12C is atop view of when the plate 52 is pressed against the substrate 51 at a45° angle with respect to the approximately straight line 7 in the planview from the +Z direction side of FIG. 12B, and through this,application of the tensile stress S (the tensile stress S at a 45° anglewith respect to the approximately straight line 7) shown in FIG. 3C wasrealized.

In Embodiment 1, the plate 52 was pressed against the substrate 51 at0°, 45° and 90° angles with respect to the approximately straight line7, and the change in the outputs V1 and V2 and the difference (V1−V2) ofthe outputs was measured when the +Z direction displacement D of thesubstrate 51 was caused to change. Results are shown in FIGS. 13A˜13C.In the graphs shown in FIGS. 13A˜13C, the horizontal axis indicates thedisplacement D (mm) and the vertical axis indicates the voltage offset(mV/V). The voltage offset is found as the difference between theoutputs V1 and V2 and the difference (V1−V2) of the outputs of themagnetic sensor 1 in a state in which the tensile stress S is notapplied, and the outputs V1 and V2 and the difference (V1−V2) of theoutputs of the magnetic sensor 1 in a state in which the tensile stressS is applied.

Embodiment 2

Using the same load addition method as Embodiment 1 (see FIGS. 12A˜12C),the tensile stress S was applied by pressing the plate 52 on thesubstrate 51 at 0°, 45° and 90° angles against the magnetic sensor 1having the configuration shown in FIG. 7 and in which the angle ofinclination of the first side 21 of the magnetic sensor chip 2 withrespect to the approximately straight line 7 was 45°, and changes in theoutputs V1 and V2 and the difference (V1−V2) of the outputs when the +Zdisplacement D of the substrate 51 was caused to change were measured.Results are shown in FIGS. 14A˜14C. In the graphs shown in FIGS.14A˜14C, the horizontal axis indicates the displacement D (mm) and thevertical axis indicates the voltage offset (mV/V). The voltage offset isfound as the difference between the outputs V1 and V2 and the difference(V1−V2) of the outputs of the magnetic sensor 1 in a state in which thetensile stress S is not applied, and the outputs V1 and V2 and thedifference (V1−V2) of the outputs of the magnetic sensor 1 in a state inwhich the tensile stress S is applied.

Comparison Example 1

A magnetic sensor 1′ having the configuration shown in FIG. 15A wasprepared. FIG. 15A is a plan view of the magnetic sensor 1′ ofComparison Example 1. In the magnetic sensor 1′ shown in FIG. 15A, inthe plan view from a first surface 3 a′ side of a sealed part 3′, themagnetization direction of a pinned layer 42′ is substantiallyorthogonal to an approximately straight line 7′ calculated through theleast squares method using a plurality of points arbitrarily set on afirst side 31′ the sealed part 3′ has.

Using the same load addition method as Embodiment 1 (see FIGS. 12A˜12C),the tensile stress S was applied by pressing the plate 52 on thesubstrate 51 at 0°, 45° and 90° angles against the magnetic sensor 1′having the configuration shown in FIG. 15A, and changes in the outputsV1 and V2 and the difference (V1−V2) of the outputs when the +Zdisplacement D of the substrate 51 was caused to change were measured.Results are shown in FIGS. 16A˜16C. In the graphs shown in FIGS.16A˜16C, the horizontal axis indicates the displacement D (mm) and thevertical axis indicates the voltage offset (mV/V). The voltage offset isfound as the difference between the outputs V1 and V2 and the difference(V1−V2) of the outputs of the magnetic sensor 1′ in a state in which thetensile stress S is not applied, and the outputs V1 and V2 and thedifference (V1−V2) of the outputs of the magnetic sensor 1′ in a statein which the tensile stress S is applied.

Comparison Example 2

A magnetic sensor 1′ having the configuration shown in FIG. 15B wasprepared. FIG. 15B is a plan view of the magnetic sensor 1′ ofComparison Example 2. In the magnetic sensor 1′ shown in FIG. 15B, whena magnetic sensor chip 2′ is viewed from a first surface 3 a′ side of asealed part 3′, the magnetization direction of a pinned layer 42′ in astate in which the external magnetic field is not applied on themagnetoresistive effect element is substantially parallel to a firstside 21′ of the magnetic sensor chip 2′.

Using the same load addition method as Embodiment 1 (see FIGS. 12A˜12C),the tensile stress S was applied by pressing the plate 52 on thesubstrate 51 at 0°, 45° and 90° angles against the magnetic sensor 1′having the configuration shown in FIG. 15B, and changes in the outputsV1 and V2 and the difference (V1−V2) of the outputs when the +Zdisplacement D of the substrate 51 was caused to change were measured.Results are shown in FIGS. 17A˜17C. In the graphs shown in FIGS.17A˜17C, the horizontal axis indicates the displacement D (mm) and thevertical axis indicates the voltage offset (mV/V). The voltage offset isfound as the difference between the outputs V1 and V2 and the difference(V1−V2) of the outputs of the magnetic sensor 1′ in a state in which thetensile stress S is not applied, and the outputs V1 and V2 and thedifference (V1−V2) of the outputs of the magnetic sensor 1′ in a statein which the tensile stress S is applied.

In the magnetic sensors of Comparison Example 1 and Comparison Example2, it was confirmed that fluctuations in the voltage offset when thetensile stress S is applied at 0° and 90° angles is small (see FIG. 16A,FIG. 16C, FIG. 17A and FIG. 17C), but when the tensile stress S isapplied at a 45° angle, the displacement D increases and accordingly thevoltage offset became large (see FIG. 16B and FIG. 17B). On the otherhand, in the magnetic sensor of Embodiment 1, it was confirmed thatfluctuations in the voltage offset when the tensile stress S was appliedat 0° and 90° angles was small, similar to Comparison Example 1 andComparison Example 2 (see FIG. 13A and FIG. 13C), but when the tensilestress S is applied at a 45° angle, fluctuations in the voltage offsetwere suppressed more than in Comparison Example 1 and Comparison Example2 (see FIG. 13B).

In addition, in the magnetic sensor of Embodiment 2, it was confirmedthat fluctuations in voltage offset were suppressed more than inComparison Example 1 and Comparison Example 2 (see FIGS. 14A, 14B) whenthe tensile stress S was applied at 0° and 45° angles. On the otherhand, when the tensile stress S was applied at a 90° angle, it wasconfirmed that the displacement D increases and accordingly the voltageoffset becomes larger (see FIG. 14C). From this, it can be said thatwhen the direction (angle) at which external stress is applied inaccordance with the application or the like of the magnetic sensor isknown, it is possible to optimize placement of the magnetic sensor chip2 inside the magnetic sensor 1 in accordance thereto. The reason thevoltage offset becomes larger when the tensile stress S is applied at a90° angle is conjectured to be because by having the first side 21, thesecond side 22, the third side 23 and the fourth side 24 possessed bythe magnetic sensor chip 2 be inclined at a 45° angle with respect tothe applied tensile stress S, the influence of the tensile stress Sapplied on the magnetic sensor chip 2 becomes large so the voltageoffset becomes large.

DESCRIPTION OF SYMBOLS

1 Magnetic sensor

2 Magnetic sensor chip

21 First side

3 Sealed part

31 First side

7 Approximately straight line

11˜14 First through fourth magnetoresistive effect elements

41 Antiferromagnetic layer

42 Pinned layer

43 Spacer layer

46 Free layer

47 Bias magnet

The invention claimed is:
 1. A magnetic sensor comprising: a magneticsensor chip that includes a magnetoresistive effect element; and asealed part that seals the magnetic sensor chip; wherein themagnetoresistive effect element includes a free layer and a pinnedlayer; the magnetization direction of the free layer can change inaccordance with an external magnetic field; the magnetization directionof the pinned layer is fixed; the sealed part has a first surface and asecond surface, which is opposite the first surface; a shape of thesealed part in a plan view from the first surface side is substantiallyquadrilateral; the substantially quadrilateral shape has a first sideand a second side, which are substantially parallel to each other, and athird side and a fourth side, which are substantially parallel to eachother and that intersect the first side and the second side; in the planview from the first surface side of the sealed part, the magnetizationdirection of the pinned layer, in a state in which the external magneticfield is not applied on the magnetoresistive effect element, is inclinedwith respect to an approximately straight line found through the leastsquares method using a plurality of points arbitrarily set on the firstside; and in the plan view from the first surface side of the sealedpart, the magnetization direction of the free layer, in a state in whichthe external magnetic field is not applied on the magnetoresistiveeffect element, is substantially orthogonal to the magnetizationdirection of the pinned layer.
 2. The magnetic sensor according to claim1, wherein the magnetization direction of the pinned layer, in a statein which the external magnetic field is not applied on themagnetoresistive effect element, is inclined at an angle of 10˜80° withrespect to the approximately straight line.
 3. The magnetic sensoraccording to claim 1, wherein: a shape of the magnetic sensor chip in aplan view of the magnetic sensor chip is substantially a quadrilateralhaving a first side and a second side substantially parallel to eachother, and a third side and a fourth side substantially parallel to eachother and intersecting the first side and the second side; the firstside of the magnetic sensor chip and the approximately straight line aresubstantially parallel; and when the magnetic sensor chip is viewed fromthe first surface side of the sealed part, the magnetization directionof the pinned layer in a state in which the external magnetic field isnot applied on the magnetoresistive effect element is inclined withrespect to the first side of the magnetic sensor chip.
 4. The magneticsensor according to claim 1, wherein: a shape of the magnetic sensorchip in a plan view of the magnetic sensor chip is substantially aquadrilateral having a first side and a second side, which aresubstantially parallel to each other, and a third side and a fourthside, which are substantially parallel to each other and which intersectthe first side and the second side; and when the magnetic sensor chip isviewed from the first surface side of the sealed part, the magnetizationdirection of the pinned layer, in a state in which the external magneticfield is not applied on the magnetoresistive effect element, issubstantially parallel to or substantially orthogonal to the first sideof the magnetic sensor chip, and the first side of the magnetic sensorchip is inclined with respect to the approximately straight line.
 5. Themagnetic sensor according to claim 1, wherein: the magnetic sensor chipincludes a plurality of the magnetoresistive effect elements; and themagnetization directions of the free layers of the magnetoresistiveeffect elements in a state in which the external magnetic field is notapplied on the plurality of magnetoresistive effect elements correspondto each other.
 6. The magnetic sensor according to claim 1, wherein themagnetoresistive effect element is a GMR element or a TMR element. 7.The magnetic sensor according to claim 1, wherein the sealed partincludes a resin.
 8. The magnetic sensor according to claim 1, wherein:the magnetoresistive effect element has a lengthwise direction and awidthwise direction which is orthogonal to the lengthwise direction, andthe lengthwise direction of the magnetoresistive effect element issubstantially parallel to the approximately straight line found throughthe least squares method using a plurality of points arbitrarily set onthe first side.
 9. The magnetic sensor according to claim 1, wherein:the magnetoresistive effect element has a lengthwise direction and awidthwise direction, which is orthogonal to the lengthwise direction,and the lengthwise direction of the magnetoresistive effect element isinclined with respect to an approximately straight line found throughthe least squares method using a plurality of points arbitrarily set onthe first side.
 10. A magnetic sensor comprising: a magnetic sensor chipthat includes a magnetoresistive effect element; and a sealed part thatseals the magnetic sensor chip; wherein the magnetoresistive effectelement includes a free layer and a pinned layer; a magnetizationdirection of the free layer can change in accordance with an externalmagnetic field; a magnetization direction of the pinned layer is fixed;the sealed part has a first surface and a second surface, which isopposite the first surface; a shape of the sealed part in a plan viewfrom the first surface side is substantially quadrilateral; thesubstantially quadrilateral shape has a first side and a second side,which are substantially parallel to each other, and a third side and afourth side, which are substantially parallel to each other and thatintersect the first side and the second side; and in the plan view fromthe first surface side of the sealed part, the magnetization directionof the pinned layer and the magnetization direction of the free layer,in a state in which the external magnetic field is not applied on themagnetoresistive effect element, are inclined with respect to anapproximately straight line found through the least squares method usinga plurality of points arbitrarily set on the first side.
 11. Themagnetic sensor according to claim 10, wherein: the magnetoresistiveeffect element has a lengthwise direction and a widthwise direction,which is orthogonal to the lengthwise direction, and the lengthwisedirection of the magnetoresistive effect element is substantiallyparallel to the approximately straight line found through the leastsquares method using a plurality of points arbitrarily set on the firstside.
 12. The magnetic sensor according to claim 10, wherein: themagnetoresistive effect element has a lengthwise direction and awidthwise direction, which is orthogonal to the lengthwise direction,and the lengthwise direction of the magnetoresistive effect element isinclined with respect to an approximately straight line found throughthe least squares method using a plurality of points arbitrarily set onthe first side.